import request from '@/utils/request'

// 查询轮播图列表
export function listBanner(query) {
    return request({
        url: '/carousel/banner/list',
        method: 'get',
        params: query
    })
}

// 查询轮播图详细
export function getBanner(bannerId) {
    return request({
        url: '/carousel/banner/' + bannerId,
        method: 'get'
    })
}

// 新增轮播图
export function addBanner(data) {
    return request({
        url: '/carousel/banner',
        method: 'post',
        data
    })
}

// 修改轮播图
export function updateBanner(data) {
    return request({
        url: '/carousel/banner',
        method: 'put',
        data
    })
}

// 删除轮播图
export function delBanner(bannerIds) {
    return request({
        url: '/carousel/banner/' + bannerIds,
        method: 'delete'
    })
}

// 修改状态
export function changeBannerStatus(data) {
    return request({
        url: '/carousel/banner/changeStatus',
        method: 'put',
        data
    })
}